<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <!-- if-else if -else
     -->
     <script>
        /* age>18  成人
        6<age<18  青少年
        age<6  儿童 console.log(age) */
        var age=13;
        if(age>=18){
            console.log("成人")
        }else if(age>=6 && age<18){
            console.log("青少年")
        }else{
            console.log("儿童")
        }
     </script>
</body>
</html>